package com.zjitc.controller;

import com.zjitc.mq.MessageQueue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/28 13:44
 * @description:
 */
@Controller
@RequestMapping("/user")
public class UserController {

  @Autowired
  private MessageQueue mq;

  @RequestMapping("/register")
  @ResponseBody
  public String register() {
    // 发送给消息队列
    mq.send(null, "hello world");
    return "OK";
  }
}
